/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.pai;

import java.util.ArrayList;
import java.util.List;
import org.tempuri.ArrayOfPacjentPAI;
import org.tempuri.PacjentPAI;
import org.tempuri.WebServiceWyszukajPacjenta;

/**
 *
 * @author Grzegorz
 */
public class TestBean {
    
    private String test;
    
    private String pesel;
    
    private String res;
    
    private List<PacjentPAI> patients;

    public List<PacjentPAI> getPatients() {
        return patients;
    }

    public void setPatients(List<PacjentPAI> patients) {
        this.patients = patients;
    }

    public String getRes() {
        return res;
    }

    public void setRes(String res) {
        this.res = res;
    }
    
    private WebServiceWyszukajPacjenta webService;
    
    public TestBean(){
        webService = new WebServiceWyszukajPacjenta();
        patients = new ArrayList<PacjentPAI>();
        test = "";
    }
    
    public String doSth(){
        ArrayOfPacjentPAI pacjenci = webService.getWebServiceWyszukajPacjentaSoap12().szukajPacjentaPesel(pesel);
        patients = pacjenci.getPacjentPAI();
        return "ok";
    }
    
    public String getTest(){
        return test;
    }
    
    public void setTest(String test){
        this.test = test;
    }

    public String getPesel() {
        return pesel;
    }

    public void setPesel(String pesel) {
        this.pesel = pesel;
    }
}
